package com.example.dubbo.provider;


import com.example.dubbo.api.ReturnObjService;
import com.example.dubbo.dto.Result;
import org.apache.dubbo.rpc.RpcContext;

import java.util.ArrayList;
import java.util.List;

public class ReturnListServiceImpl implements ReturnObjService {

    @Override
    public Result sendMessage(String name) {
        System.out.println("return " + name + ", request from consumer: " + RpcContext.getContext().getRemoteAddress());
        List list = new ArrayList();
        list.add(name);
        return Result.success(list);
    }
}
